package com.zrrd.springboot_homework.service.impl;

import com.zrrd.springboot_homework.mapper.TeaMapper;
import com.zrrd.springboot_homework.pojo.Tea;
import com.zrrd.springboot_homework.service.TeaService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author WanJl
 * @version 1.0
 * @title TeaServiceImpl
 * @description
 * @create 2024/3/23
 */
@Service
public class TeaServiceImpl implements TeaService {
    @Resource
    TeaMapper teaMapper;
    @Override
    public List<Tea> queryAll() {
        return teaMapper.queryAll();
    }

    @Override
    public Integer add(Tea tea) {
        return teaMapper.insert(tea);
    }

    @Override
    public Integer update(Tea tea) {
        return teaMapper.update(tea);
    }

    @Override
    public Integer remove(Integer id) {
        return teaMapper.delete(id);
    }

    @Override
    public Tea queryById(Integer id) {
        return teaMapper.queryById(id);
    }
}
